﻿@model IVoteModel
@foreach (var question in Model.Questions)
{
<section class="dailySurvey">
   <header>
        <h1>@question.Title</h1>
        @AddControls(
            @question.Description.IsNotEmpty()
            ? new Cite { new Literal("'{0}'".FormatWith(@question.Description)) }
            : null )
   </header>
   <nav>
    <ul>
    @foreach (var answer in question.Answers )
    {
        var url = Url.Action(Str.Actions.Default, Str.Controllers.Vote,
            new RouteValueDictionary { { "id", question.ID }, { "answerId", answer.Position } });
        <li>
        <a href="@url" title="@answer.Title">
          <span class="bar">
            <span class="filler" style="width: @(answer.ToCssPercentage())%;" ></span>
          </span>
        </a>
        <a href="@url" title="@answer.Description">@answer.Title (@(answer.Percentage.ToDisplay("N1"))%)</a>
        </li>
    }
    </ul>
   </nav>
</section>
}